<?php

define ("host","127.0.0.1");
define ("user","root");
define ("password", "");
define ("database","appstore");

class Database{
    var $conn; // private $conn
    public function __construct()
    {
        $this->conn = mysqli_connect(host, user, password, database);
        if(empty($this->conn)){
            die("Error ".mysqli_error($this->conn));
        } else {
            mysqli_query($this->conn,"SET CHARACTER SET utf8");
        }
    }
    // return connect
    public function returnConnection()
    {
        return $this->conn;
    }
}